package graphic.primitives.car;

import graphic.primitives.general.GraphicObject;
import graphic.primitives.general.IGraphicObject;
import java.awt.Color;

/**
 * 
 * @author david.zbornik
 *
 */
public class Exhaust extends GraphicObject implements IGraphicObject{

	private int sirka;
	private int vyska;
	
	public Exhaust (int x, int y, int sirka, int vyska) {
		super(x, y);
		this.sirka = sirka;
		this.vyska = vyska;
	}
	
	@Override
	public void redraw() {
		/*mainWindow.line(x,y, x + sirka,y);
		mainWindow.line(x+sirka,y, x + sirka,y+vyska);
		mainWindow.line(x+sirka,y+vyska, x,y+vyska);
		mainWindow.line(x,y, x,y+vyska);*/
		
		mainWindow.setColor(new Color(0.1f, 0.1f, 0.1f));
		
		for (int i = 0; i < sirka; i++)
		{
			mainWindow.line(x + i, y + vyska, x + i, y);
		}
		
		mainWindow.setColor(Color.BLACK);
	}
}
	